package com.fenrirtec.aepp.common.dao;

import java.util.List;

import com.fenrirtec.aepp.common.condition.TenderCondition;
import com.fenrirtec.aepp.common.model.Member;
import com.fenrirtec.aepp.common.model.TenderBid;
import com.fenrirtec.aepp.common.model.TenderDetail;
import com.fenrirtec.aepp.common.model.TenderEnroll;
import com.fenrirtec.aepp.common.model.TenderFinalist;
import com.fenrirtec.aepp.common.model.TenderInvite;
import com.fenrirtec.aepp.common.model.TenderMemberStatus;
import com.fenrirtec.aepp.common.model.TenderProduct;
import com.fenrirtec.aepp.common.model.TenderQuote;
import com.fenrirtec.aepp.common.model.TenderQuoteDetail;

public interface TenderDao {
	Integer countByCnd(TenderCondition condition);
    List<TenderDetail> searchByCnd(TenderCondition condition);
    Boolean insertTenderInformation(TenderDetail tenderDetail, String createUser);
    Boolean insertTenderProduct(TenderProduct tenderProduct, String createUser);
    Boolean insertTenderEnroll(TenderEnroll tenderEnroll, String createUser);
    Boolean insertTenderFinalist(TenderFinalist tenderFinalist, String createUser);
    Boolean insertTenderBid(TenderBid tenderBid, String createUser);
    Boolean deleteTenderBid(Integer tenderId, String memberLoginName);
    List<TenderProduct> findProduct(Integer tenderId);
    TenderDetail findDetail(Integer tenderId);
    TenderMemberStatus findTenderMemberStatus(Integer tenderId, String memberLoginName);
    Boolean insertTenderQuote(TenderQuote tenderQuote);
    Boolean insertTenderQuoteDetail(TenderQuoteDetail tenderQuoteDetail);
    Boolean updateFinalistFlag(Integer tenderId, String memberLoginName, Boolean finalistFlag, String updateUser);
    Boolean updateQuoteFlag(Integer tenderId, String memberLoginName, Boolean quoteFlag, String updateUser);
    Boolean updateBidFlag(Integer tenderId, String memberLoginName, Boolean bidFlag, String updateUser);
    Boolean bindTemplate(Integer tenderId, Integer attachmentId);
    Boolean deleteTemplate(Integer tenderId);
    List<TenderInvite> findInvite(Integer tenderId);
    Boolean updateTenderInformation(TenderDetail tenderDetail, String updateUser);
    Boolean deleteTenderProduct(Integer tenderId);
    Boolean deleteTenderInvite(Integer tenderId);
    Boolean deleteTenderInformation(Integer tenderId);
    Boolean changeStatus(Integer tenderId, Integer status, String updateUser);
    List<Member> findEnrollMember(Integer tenderId);
    List<Member> findFinalistMember(Integer tenderId);
    List<Member> findQuoteMember(Integer tenderId);
    Member findBidMember(Integer tenderId);
    List<TenderQuoteDetail> findQuoteDetail(Integer tenderId, String memberLoginName);
    TenderQuote findQuote(Integer tenderId, String memberLoginName);
}
